<template>
  <div>
    <el-button @click="auto">开始</el-button>
  </div>
</template>
<script>
import { createSocket } from '../assets/js/websocketTest.js'

export default {
  data() {
    return {
      i: 1
    }
  },
  methods: {
    start() {
      this.i = this.i + this.i
      this.$store.state.Num = 13357146917 + this.i
      this.$store.state.Password = 123
      createSocket('ws://192.168.199.205:6060/test')
    },
    auto() {
      for (let time = 0; time < 100; time++) {
        setTimeout(() => {
          this.start()
        }, 5000)
      }
    }
  }
}
</script>
